{% extends "base.html" %}

{% block body_page %}
<script type="text/javascript">
	$(function() {
		var d=new Date();
	    $('.get').change(function(){
			var p = $('[name=s]').find(':selected').val();
			var f1 = $('[name=filte1]:checked').val();
			var f2 = $('[name=filte2]:checked').val();
			var url = "getserverstatus/?p="+p+"&f1="+f1+"&f2="+f2+"&t="+d.getTime();
            $.get(url,function(result){
            	$("#box").html(result);
            });
        });
	});
</script>

<div class="list">
    <div class="line">
        <form id="form1" name="form1" method="get" action="http://{{domain}}/index/single_server/checkserverstatus/">
            <p>
              <label for="select1"></label>
                要查看的项目
                <p>
                 <select name="s" class="get">
                    <option>选择项目</option>
                    {% for pro in pros %}
                         <!--<option value="{{escape(str(pro.id))}}">{{escape(pro.project)}}</option>-->
                         <option value="{{escape(str(pro.project))}}">{{escape(pro.project)}}</option>
                    {% end %}
                  </select>
                <label for="checkbox1"></label>
                 <label>
                   <input type="checkbox" name="filte1" value="d" class="get" />
                   只显示错误部署</label>
                 <label>
                   <input type="checkbox" name="filte2" value="h" class="get" />
                   只显示失效服务</label>
                 <input type="submit" name="button1" id="button1" value="检查项目的HTTP服务" />
                  <!-- package history -->
                 <div id="box">
         </div>
              </p>
            </p>
        </form>
	</div>
</div>
{% end %}

